#! /bin/bash
HOST=10.163.12.183
USER=root
PASS=widubgt5mko0!@#
echo "Starting to sftp log..."
lftp -u $USER,$PASS sftp://$HOST <<END_SFTP
 
lcd /alidata1/shell/logger/pv
cd /usr/local/logs/pv
mget pv.log.`date +%Y-%m-%d-%H --date='1 hours ago'`
 
echo "Sftp logfile over..."
bye

